package cn.flant.io;

import java.net.DatagramSocket;

import cn.flant.io.udp.MessageHandler;
import cn.flant.io.udp.SocketHandler;
import cn.flant.io.udp.StringMessageHandler;
import cn.flant.io.udp.UdpServer;

public class MyUdpSocketHandler extends SocketHandler {

	public MyUdpSocketHandler(DatagramSocket socket, UdpServer udpServer) {
		super(socket, udpServer);
	}

	@Override
	public MessageHandler createMessageHandler() {
		return new StringMessageHandler();
	}

	@Override
	public void processMessage(Object message) {
		System.out.println(this+"  ===> "+message);
	}

}
